<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>焦点</title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }

    #focusPage {
      width: 900px;
      height: 720px;
      background-color: #000;
      position: relative;
    }

    .focusSwitch {
      width: 100%;
      height: 100%;
      background-color: #fff;
      margin: 10px auto;
      display: flex;
      flex-wrap: wrap;
    }

    .focusBox {
      display: flex;
      flex-wrap: wrap;
      border: 1px solid #000;
      margin: 10px;
    }

    .focusWidget {
      width: 100px;
      height: 20px;
      background-color: #254935;
      margin-top: 10px;
      margin-left: 10px;
    }

    .focusScroll {
      width: 600px;
      height: 200px;
      white-space: nowrap;
      overflow: hidden;
      position: relative;
    }

    .focusScroll>.focusBox {
      display: block
    }

    .focusScrollContent {
      position: absolute;
      left: 0;
      top: 0;
    }

    .focusScrollContent>.focusScrollItem {
      display: inline-block;
      margin-right: -4px;
    }
    .scrollY>.focusScrollItem {
      display: block;
      margin-right: -4px;
    }

    .dark-focus {
      background-color: yellow;
    }

    .is-focus {
      background-color: #ff0000;
    }

    .dialog {
      position: absolute;
      left: 0;
      bottom: 0;
      z-index: 1;
      width: 900px;
      height: 220px;
      background-color: rgba(0, 0, 0, 0.8);
      display: none;
    }
  </style>
</head>

<body>
  <div id="focusPage">
    <div class="focusSwitch" id="switch1" focusId="dakaitanchuang">
      <div class="focusScroll" f-scroll="Y" style="height: 600px; background-color: antiquewhite;"  id="scrollPage">
        <div class="focusScrollContent scrollY focusBox"id="box222">
          <div class="focusScrollItem">
            <div class="focusScroll" f-scroll="X" id="scroll1">
              <div class="focusScrollContent focusBox" id="box13"cache="auto">
                <div class="focusScrollItem">
                  <div class="focusWidget" goLeft="endId" id="firstId"></div>
                </div>
                <div class="focusScrollItem">
                  <div style="display: flex; flex-wrap: nowrap;">
                    <div class="focusWidget"></div>
                    <div class="focusWidget"></div>
                    <div class="focusWidget"></div>
                  </div>
                </div>
                <div class="focusScrollItem">
                  <div class="focusWidget" onFocus="onFocus">onFocus</div>
                </div>
                <div class="focusScrollItem">
                  <div style="display: flex; flex-wrap: nowrap;">
                    <div class="focusWidget"></div>
                    <div class="focusWidget"></div>
                    <div class="focusWidget"></div>
                  </div>
                </div>
                <div class="focusScrollItem">
                  <div class="focusWidget"></div>
                </div>
                <div class="focusScrollItem">
                  <div class="focusWidget"></div>
                </div>
                <div class="focusScrollItem">
                  <div class="focusWidget" id="hahahahahaha1">hahahahahaha</div>
                </div>
                <div class="focusScrollItem">
                  <div class="focusWidget"></div>
                </div>
                <div class="focusScrollItem">
                  <div class="focusWidget"></div>
                </div>
                <div class="focusScrollItem">
                  <div class="focusWidget"></div>
                </div>
                <div class="focusScrollItem">
                  <div class="focusWidget"></div>
                </div>
                <div class="focusScrollItem">
                  <div class="focusWidget"></div>
                </div>
                <div class="focusScrollItem">
                  <div class="focusWidget"></div>
                </div>
                <div class="focusScrollItem">
                  <div class="focusWidget"></div>
                </div>
                <div class="focusScrollItem">
                  <div class="focusWidget"></div>
                </div>
              </div>
            </div>
          </div>
          <div class="focusScrollItem">
            <div class="focusScroll" f-scroll="X" id="scroll12">
              <div class="focusScrollContent focusBox" id="box14" cache="auto">
                <div class="focusScrollItem">
                  <div class="focusWidget" goLeft="endId2" id="firstId2"></div>
                </div>
                <div class="focusScrollItem">
                  <div style="display: flex; flex-wrap: nowrap;">
                    <div class="focusWidget"></div>
                    <div class="focusWidget"></div>
                    <div class="focusWidget"></div>
                  </div>
                </div>
                <div class="focusScrollItem">
                  <div class="focusWidget" onFocus="onFocus">onFocus</div>
                </div>
                <div class="focusScrollItem">
                  <div style="display: flex; flex-wrap: nowrap;">
                    <div class="focusWidget"></div>
                    <div class="focusWidget"></div>
                    <div class="focusWidget"></div>
                  </div>
                </div>
                <div class="focusScrollItem">
                  <div class="focusWidget"></div>
                </div>
                <div class="focusScrollItem">
                  <div class="focusWidget"></div>
                </div>
                <div class="focusScrollItem">
                  <div class="focusWidget" id="hahahahahaha2">hahahahahaha</div>
                </div>
                <div class="focusScrollItem">
                  <div class="focusWidget"></div>
                </div>
                <div class="focusScrollItem">
                  <div class="focusWidget"></div>
                </div>
                <div class="focusScrollItem">
                  <div class="focusWidget"></div>
                </div>
                <div class="focusScrollItem">
                  <div class="focusWidget"></div>
                </div>
                <div class="focusScrollItem">
                  <div class="focusWidget"></div>
                </div>
                <div class="focusScrollItem">
                  <div class="focusWidget"></div>
                </div>
                <div class="focusScrollItem">
                  <div class="focusWidget"></div>
                </div>
                <div class="focusScrollItem">
                  <div class="focusWidget"></div>
                </div>
              </div>
            </div>
          </div>
          <div class="focusScrollItem">
            <div class="focusScroll" f-scroll="X" id="scroll13">
              <div class="focusScrollContent focusBox" id="box15" cache="auto">
                <div class="focusScrollItem">
                  <div class="focusWidget" goLeft="endId3" id="firstId3"></div>
                </div>
                <div class="focusScrollItem">
                  <div style="display: flex; flex-wrap: nowrap;">
                    <div class="focusWidget"></div>
                    <div class="focusWidget"></div>
                    <div class="focusWidget"></div>
                  </div>
                </div>
                <div class="focusScrollItem">
                  <div class="focusWidget" onFocus="onFocus">onFocus</div>
                </div>
                <div class="focusScrollItem">
                  <div style="display: flex; flex-wrap: nowrap;">
                    <div class="focusWidget"></div>
                    <div class="focusWidget"></div>
                    <div class="focusWidget"></div>
                  </div>
                </div>
                <div class="focusScrollItem">
                  <div class="focusWidget"></div>
                </div>
                <div class="focusScrollItem">
                  <div class="focusWidget"></div>
                </div>
                <div class="focusScrollItem">
                  <div class="focusWidget" id="hahahahahaha3">hahahahahaha</div>
                </div>
                <div class="focusScrollItem">
                  <div class="focusWidget"></div>
                </div>
                <div class="focusScrollItem">
                  <div class="focusWidget"></div>
                </div>
                <div class="focusScrollItem">
                  <div class="focusWidget"></div>
                </div>
                <div class="focusScrollItem">
                  <div class="focusWidget"></div>
                </div>
                <div class="focusScrollItem">
                  <div class="focusWidget"></div>
                </div>
                <div class="focusScrollItem">
                  <div class="focusWidget"></div>
                </div>
                <div class="focusScrollItem">
                  <div class="focusWidget"></div>
                </div>
                <div class="focusScrollItem">
                  <div class="focusWidget"></div>
                </div>
              </div>
            </div>
          </div>
          <div class="focusScrollItem">
            <div class="focusScroll" f-scroll="X" id="scroll14">
        <div class="focusScrollContent focusBox" id="box16" cache="auto">
          <div class="focusScrollItem">
            <div class="focusWidget" goLeft="endId4" id="firstId4"></div>
          </div>
          <div class="focusScrollItem">
            <div style="display: flex; flex-wrap: nowrap;">
              <div class="focusWidget"></div>
              <div class="focusWidget"></div>
              <div class="focusWidget"></div>
            </div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget" onFocus="onFocus">onFocus</div>
          </div>
          <div class="focusScrollItem">
            <div style="display: flex; flex-wrap: nowrap;">
              <div class="focusWidget"></div>
              <div class="focusWidget"></div>
              <div class="focusWidget"></div>
            </div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget" id="hahahahahaha4">hahahahahaha</div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
        </div>
      </div>
          </div>
          <div class="focusScrollItem">
            <div class="focusScroll" f-scroll="X" id="scroll15">
        <div class="focusScrollContent focusBox" id="box17" cache="auto">
          <div class="focusScrollItem">
            <div class="focusWidget" goLeft="endId5" id="firstId5"></div>
          </div>
          <div class="focusScrollItem">
            <div style="display: flex; flex-wrap: nowrap;">
              <div class="focusWidget"></div>
              <div class="focusWidget"></div>
              <div class="focusWidget"></div>
            </div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget" onFocus="onFocus">onFocus</div>
          </div>
          <div class="focusScrollItem">
            <div style="display: flex; flex-wrap: nowrap;">
              <div class="focusWidget"></div>
              <div class="focusWidget"></div>
              <div class="focusWidget"></div>
            </div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget" id="hahahahahaha5">hahahahahaha</div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
        </div>
      </div>
          </div>
          <div class="focusScrollItem">
            <div class="focusScroll" f-scroll="X" id="scroll16">
        <div class="focusScrollContent focusBox" id="box1" cache="auto">
          <div class="focusScrollItem">
            <div class="focusWidget" goLeft="endId6" id="firstId6"></div>
          </div>
          <div class="focusScrollItem">
            <div style="display: flex; flex-wrap: nowrap;">
              <div class="focusWidget"></div>
              <div class="focusWidget"></div>
              <div class="focusWidget"></div>
            </div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget" onFocus="onFocus">onFocus</div>
          </div>
          <div class="focusScrollItem">
            <div style="display: flex; flex-wrap: nowrap;">
              <div class="focusWidget"></div>
              <div class="focusWidget"></div>
              <div class="focusWidget"></div>
            </div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget" id="hahahahahaha6">hahahahahaha</div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
        </div>
      </div>
          </div>
        </div>
      </div>
      <div class="focusScroll" f-scroll="X" id="scroll17">
        <div class="focusScrollContent focusBox" id="box12" cache="auto">
          <div class="focusScrollItem">
            <div class="focusWidget" goLeft="endId7" id="firstId7"></div>
          </div>
          <div class="focusScrollItem">
            <div style="display: flex; flex-wrap: nowrap;">
              <div class="focusWidget"></div>
              <div class="focusWidget"></div>
              <div class="focusWidget"></div>
            </div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget" onFocus="onFocus">onFocus</div>
          </div>
          <div class="focusScrollItem">
            <div style="display: flex; flex-wrap: nowrap;">
              <div class="focusWidget"></div>
              <div class="focusWidget"></div>
              <div class="focusWidget"></div>
            </div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget" id="hahahahahaha">hahahahahaha</div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
        </div>
      </div>
      <div class="focusScroll" f-scroll="X" id="scroll2">
        <div class="focusScrollContent focusBox" id="box2" cache="heihh">
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div style="display: flex; flex-wrap: nowrap;">
              <div class="focusWidget"></div>
              <div class="focusWidget"></div>
              <div class="focusWidget"></div>
            </div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget" id="heihh">hahahahahaha</div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div style="display: flex; flex-wrap: nowrap;">
              <div class="focusWidget"></div>
              <div class="focusWidget"></div>
              <div class="focusWidget"></div>
            </div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
          <div class="focusScrollItem">
            <div class="focusWidget"></div>
          </div>
        </div>
      </div>
      <div class="focusWidget" id="dakaitanchuang" onEnter="focus.onPopup('popup-1', true)">打开弹窗1
      </div>
      <div class="focusWidget" onEnter="onScrollTo('hahahahahaha')">hahahahahaha</div>
      <div class="focusWidget" onEnter="onScrollTo('heihh')">heihh</div>
      <div class="focusWidget"></div>
      <div class="focusWidget"></div>
      <div class="focusWidget"></div>
      <div class="focusWidget"></div>
      <div class="focusWidget"></div>
      <div class="focusWidget"></div>
      <div class="focusBox" sequenceRow="7" sequenceLink="false" onIn="onInBox">
        <div class="focusWidget"></div>
        <div class="focusWidget"></div>
        <div class="focusWidget"></div>
        <div class="focusWidget"></div>
        <div class="focusWidget"></div>
        <div class="focusWidget"></div>
        <div class="focusWidget"></div>
        <div class="focusWidget"></div>
        <div class="focusWidget"></div>
        <div class="focusWidget"></div>
        <div class="focusWidget"></div>
      </div>
    </div>
    <div class="focusPopup dialog" id="popup-1" onBack="focus.onPopup('popup-1', false)">
      <div class="focusWidget"></div>
      <div class="focusWidget"></div>
      <div class="focusWidget" onEnter="focus.onPopup('popup-2', true)">打开弹窗2</div>
    </div>
    <div class="focusPopup dialog" id="popup-2" onBack="focus.onPopup('popup-2', false)">
      <div class="focusWidget">弹窗3</div>
      <div class="focusWidget"></div>
      <div class="focusWidget"></div>
      <div class="focusWidget"></div>
    </div>
  </div>
</body>
<script src="../focus2.2.js"></script>
<script>
  var focus = new LyFocusFrame("focusPage")
  function onFocus(params) {

  }
  function onInBox(params) {
    console.log(params, "onInBox");

  }
  function onScrollTo(id) {
    // focus.init()
    focus.findSwitch("switch1").setDarkFocus("hahahahahaha")
    focus.findSwitch("switch1").setDarkFocus("heihh")


    // focus.onPopup(id, show)
  }

</script>

</html>